function i = RouletteWheelSelection(P)
% 轮盘赌用于选择某个网格
    r = rand;
    
    C = cumsum(P);
    
    i = find(r <= C, 1, 'first');

end